<?php $section = 'Cart'; ?>
<?php
	$formCheck = array($_POST['First_Name'], $_POST['Last_Name'], $_POST['Email'], $_POST['Street_Name'], $_POST['City_Name'],
					   $_POST['State_Name'], $_POST['Zip_Code'], $_POST['bStreet_Name'], $_POST['bCity_Name'],
					   $_POST['bState_Name'], $_POST['bZip_Code'], $_POST['CCName'], $_POST['CCType'], $_POST['CCNumber']);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Core[nerd]-Thank You!</title>
<link href="inc/main.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
function MissingField() {
	warning = "Missing Fields";
	alert(warning);
}
</script>

</head>

<body>
<div id="container">

<?php include('inc/nav.php'); ?>
<?php
$isComplete = 1;
foreach ($formCheck as $inputs)
{
	if (empty($inputs)) {
		$isComplete = 2;
		break;
	}
}
if ($isComplete == 1) {
	echo '<h1>Thank You For Your Purchase!</h1>';
	unset($_SESSION['cart']);
    $_SESSION['items'] = 0;
    $_SESSION['total_price'] ='0.00';
}
else {
echo '<script type="text/javascript">
{
	warning = "Missing Fields";
	alert(warning);
}
</script>';
}
?>
</div>
</body>

</html>
